﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Web.Security;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RibbonBar.OnClientButtonClicked = "onButtonClicked";
        }
    }
    protected void RibbonBar_ButtonClick(object sender, RibbonBarButtonClickEventArgs e)
    {
        if (e.Button.Value == "Logout")
        {
            Session.Abandon();
            FormsAuthentication.SignOut();
            Response.Redirect("~/Default.aspx");
        }
        else
            Response.Redirect(string.Format("~/Admin/{0}.aspx", e.Button.Value));
    }
}
